#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
	int A[] = {1,2,3,4,5};
	int B[] = {6,7,8,9,10};
	int n;
	for (int i = 0; i < 5; i++) {
		n = B[i];
		B[i] = A[i];
		A[i] = n;
	}
	for (int i = 0; i < 5; i++) {
		printf("%d ", A[i]);
	}
	printf("\n");
	for (int i = 0; i < 5; i++) {
		printf("%d ", B[i]);
	}
}